/*
 * main.cpp
 *
 *  Created on: Jun 5, 2011
 *      Author: wilsok17
 */

#include "Grid.h"
#include "Search.h"
#include "Yogurt.h"
#include "../DotMatrix/Seeker.h"
#include <iostream>
#include <string>
#include <stdio.h>
#include "DataObjects.h"
#include "Driver.h"
#include <stdlib.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>

int main() {

	Grid g;
	g.addTwoWayEdge("A", pair<string, DIRECTION> ("B", N));
	g.addTwoWayEdge("A", pair<string, DIRECTION> ("H", E));
	g.addTwoWayEdge("B", pair<string, DIRECTION> ("C", N));
	g.addTwoWayEdge("B", pair<string, DIRECTION> ("I", E));
	g.addTwoWayEdge("C", pair<string, DIRECTION> ("D", N));
	g.addTwoWayEdge("C", pair<string, DIRECTION> ("J", E));
	g.addTwoWayEdge("D", pair<string, DIRECTION> ("E", N));
	g.addTwoWayEdge("D", pair<string, DIRECTION> ("K", E));
	g.addTwoWayEdge("E", pair<string, DIRECTION> ("G", N));
	g.addTwoWayEdge("E", pair<string, DIRECTION> ("L", E));
	g.addTwoWayEdge("G", pair<string, DIRECTION> ("M", E));
	g.addTwoWayEdge("H", pair<string, DIRECTION> ("I", N));
	g.addTwoWayEdge("H", pair<string, DIRECTION> ("N", E));
	g.addTwoWayEdge("I", pair<string, DIRECTION> ("J", N));
	g.addTwoWayEdge("I", pair<string, DIRECTION> ("O", E));
	g.addTwoWayEdge("J", pair<string, DIRECTION> ("K", N));
	g.addTwoWayEdge("J", pair<string, DIRECTION> ("P", E));
	g.addTwoWayEdge("K", pair<string, DIRECTION> ("L", N));
	g.addTwoWayEdge("K", pair<string, DIRECTION> ("Q", E));
	g.addTwoWayEdge("L", pair<string, DIRECTION> ("M", N));
	g.addTwoWayEdge("L", pair<string, DIRECTION> ("R", E));
	g.addTwoWayEdge("M", pair<string, DIRECTION> ("S", E));
	g.addTwoWayEdge("N", pair<string, DIRECTION> ("O", N));
	g.addTwoWayEdge("N", pair<string, DIRECTION> ("T", E));
	g.addTwoWayEdge("O", pair<string, DIRECTION> ("P", N));
	g.addTwoWayEdge("O", pair<string, DIRECTION> ("U", E));
	g.addTwoWayEdge("P", pair<string, DIRECTION> ("Q", N));
	g.addTwoWayEdge("P", pair<string, DIRECTION> ("V", E));
	g.addTwoWayEdge("Q", pair<string, DIRECTION> ("R", N));
	g.addTwoWayEdge("Q", pair<string, DIRECTION> ("W", E));
	g.addTwoWayEdge("R", pair<string, DIRECTION> ("S", N));
	g.addTwoWayEdge("R", pair<string, DIRECTION> ("X", E));
	g.addTwoWayEdge("S", pair<string, DIRECTION> ("Y", E));
	g.addTwoWayEdge("T", pair<string, DIRECTION> ("U", N));
	g.addTwoWayEdge("T", pair<string, DIRECTION> ("Z", E));
	g.addTwoWayEdge("U", pair<string, DIRECTION> ("V", N));
	g.addTwoWayEdge("U", pair<string, DIRECTION> ("AA", E));
	g.addTwoWayEdge("V", pair<string, DIRECTION> ("W", N));
	g.addTwoWayEdge("V", pair<string, DIRECTION> ("AB", E));
	g.addTwoWayEdge("W", pair<string, DIRECTION> ("X", N));
	g.addTwoWayEdge("W", pair<string, DIRECTION> ("AC", E));
	g.addTwoWayEdge("X", pair<string, DIRECTION> ("Y", N));
	g.addTwoWayEdge("X", pair<string, DIRECTION> ("AD", E));
	g.addTwoWayEdge("Y", pair<string, DIRECTION> ("AE", E));
	g.addTwoWayEdge("Z", pair<string, DIRECTION> ("AA", N));
	g.addTwoWayEdge("Z", pair<string, DIRECTION> ("AF", E));
	g.addTwoWayEdge("AA", pair<string, DIRECTION> ("AB", N));
	g.addTwoWayEdge("AA", pair<string, DIRECTION> ("AG", E));
	g.addTwoWayEdge("AB", pair<string, DIRECTION> ("AC", N));
	g.addTwoWayEdge("AB", pair<string, DIRECTION> ("AH", E));
	g.addTwoWayEdge("AC", pair<string, DIRECTION> ("AD", N));
	g.addTwoWayEdge("AC", pair<string, DIRECTION> ("AI", E));
	g.addTwoWayEdge("AD", pair<string, DIRECTION> ("AE", N));
	g.addTwoWayEdge("AD", pair<string, DIRECTION> ("AJ", E));
	g.addTwoWayEdge("AE", pair<string, DIRECTION> ("AK", E));
	g.addTwoWayEdge("AF", pair<string, DIRECTION> ("AG", N));
	g.addTwoWayEdge("AG", pair<string, DIRECTION> ("AH", N));
	g.addTwoWayEdge("AH", pair<string, DIRECTION> ("AI", N));
	g.addTwoWayEdge("AI", pair<string, DIRECTION> ("AJ", N));
	g.addTwoWayEdge("AJ", pair<string, DIRECTION> ("AK", N));


	/* Test code
	fflush( stdout);
	cout << "Starting simulation" << endl;
	srand(time(0));
	int maxSize = 0;
	int minSize = 1000;
	for (int k = 0; k<=20; ++k) {
		Driver driver;
		list<pair<string, DIRECTION> > path = driver.run();
		if(path.size() > maxSize) {
			maxSize = path.size();
		} else if (path.size() < minSize) {
			minSize = path.size();
		}
	}
*/

		Yogurt yogurt(g);




	return 1;
}
